package com.vic.common.config;

import com.vic.common.cache.Cache;
import com.vic.common.cache.CacheFactory;
import com.vic.common.cache.CacheType;
import com.vic.common.cache.cacheimpl.LocalCache;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CacheConfig {
    @Bean
    public Cache<String,Object> localCache(){
        CacheFactory factory = new CacheFactory();
        return factory.getCache(CacheType.LOCAL);
    }
}
